package com.qf.lanzhou.shop.pojo.entity;

import lombok.Data;

import java.util.List;

/**
 * @author 是柠檬甜
 * @date 2021/1/11 14:12
 */
@Data
public class Page {
    //页码
    private Integer pageIndex;
    //页大小  显示多少行数据
    private Integer pageSize;
    //数据的总行数
    private Integer totalCounts;
    //总页数
    private Integer totalPages;
    //起始行
    private Integer startRows;
    //搜索的id
    private List searchIds;

    public Page(Integer pageIndex) {
        this(pageIndex, 4);
    }

    public Page(Integer pageIndex, Integer pageSize) {
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
        this.setStartRows((pageIndex - 1) * pageSize);
    }

    public Page() {
    }
}
